noht Disable Hyperthreading.
- ifname=ethXX Select which Ethernet interface to use.
-
- ifname=dummy Don't use any network interface.
-
com1=<baud>,DPS[,<io_base>,<irq>]
com2=<baud>,DPS[,<io_base>,<irq>]
Xen supports up to two 16550-compatible serial ports.
omitting the character, enables auto-switching.
[NB. Default for this option is 'a']
+ nmi=<nmi-error-behaviour>
+ Specify what to do with an NMI parity or I/O error.
+ 'nmi=fatal': Xen prints a diagnostic and then hangs.
+ 'nmi=dom0': Inform DOM0 of the NMI.
+ 'nmi=ignore': Ignore the NMI.
+ [NB. Default is 'dom0' ('fatal' for debug builds).]
+
dom0_mem=xxx Set the initial amount of memory for domain0.
pdb=xxx Enable the pervasive debugger. See docs/pdb.txt
noht Disable Hyperthreading.
- ifname=ethXX Select which Ethernet interface to use.
-
- ifname=dummy Don't use any network interface.
-
com1=<baud>,DPS[,<io_base>,<irq>]
com2=<baud>,DPS[,<io_base>,<irq>]
Xen supports up to two 16550-compatible serial ports.
omitting the character, enables auto-switching.
[NB. Default for this option is 'a']
+ nmi=<nmi-error-behaviour>
+ Specify what to do with an NMI parity or I/O error.
+ 'nmi=fatal': Xen prints a diagnostic and then hangs.
+ 'nmi=dom0': Inform DOM0 of the NMI.
+ 'nmi=ignore': Ignore the NMI.
+ [NB. Default is 'dom0' ('fatal' for debug builds).]
+
dom0_mem=xxx Set the maximum amount of memory for domain0.
tbuf_size=xxx Set the size of the per-cpu trace buffers, in pages
\begin{description}
\item[Atropos] One of the CPU schedulers provided by Xen.
Atropos provides domains with absolute shares
- of the CPU, with timeliness guarantees and a
- mechanism for sharing out ``slack time''.
+ of the CPU, with timeliness guarantees and a
+ mechanism for sharing out ``slack time''.
\item[BVT] The BVT scheduler is used to give propotional
fair shares of the CPU to domains.
\item[Exokernel] A minimal piece of privileged code, similar to
a {\bf microkernel} but providing a more
- `hardware-like' interface to the tasks it
- manages. This is similar to a paravirtualising
- VMM like {\bf Xen} but was designed as a new
- operating system structure, rather than
- specifically to run multiple conventional OSs.
+ `hardware-like' interface to the tasks it
+ manages. This is similar to a paravirtualising
+ VMM like {\bf Xen} but was designed as a new
+ operating system structure, rather than
+ specifically to run multiple conventional OSs.
\item[FBVT] A derivative of the { \bf BVT } scheduler that
aims to give better fairness performance to IO
- intensive domains in competition with CPU
- intensive domains.
+ intensive domains in competition with CPU
+ intensive domains.
\item[Domain] A domain is the execution context that
contains a running { \bf virtual machine }.
- The relationship between virtual machines
- and domains on Xen is similar to that between
- programs and processes in an operating
- system: a virtual machine is a persistent
- entity that resides on disk (somewhat like
- a program). When it is loaded for execution,
- it runs in a domain. Each domain has a
- { \bf domain ID }.
+ The relationship between virtual machines
+ and domains on Xen is similar to that between
+ programs and processes in an operating
+ system: a virtual machine is a persistent
+ entity that resides on disk (somewhat like
+ a program). When it is loaded for execution,
+ it runs in a domain. Each domain has a
+ { \bf domain ID }.
\item[Domain 0] The first domain to be started on a Xen
machine. Domain 0 is responsible for managing
- the system.
+ the system.
\item[Domain ID] A unique identifier for a { \bf domain },
analagous to a process ID in an operating
- system. Apart from domain
+ system. Apart from domain
\item[Full virtualisation] An approach to virtualisation which
requires no modifications to the hosted
\item[Hypervisor] An alternative term for { \bf VMM }, used
because it means ``beyond supervisor'',
- since it is responsible for managing multiple
- ``supervisor'' kernels.
+ since it is responsible for managing multiple
+ ``supervisor'' kernels.
\item[Microkernel] A small base of code running at the highest
hardware privilege level. A microkernel is
- responsible for sharing CPU and memory (and
- sometimes other devices) between less
- privileged tasks running on the system.
- This is similar to a VMM, particularly a
- {\bf paravirtualising} VMM but typically
- addressing a different problem space and
- providing different kind of interface.
+ responsible for sharing CPU and memory (and
+ sometimes other devices) between less
+ privileged tasks running on the system.
+ This is similar to a VMM, particularly a
+ {\bf paravirtualising} VMM but typically
+ addressing a different problem space and
+ providing different kind of interface.
\item[NetBSD/Xen] A port of NetBSD to the Xen architecture.
\item[VMM] Virtual Machine Monitor - the software that
allows multiple virtual machines to be
- multiplexed on a single physical machine.
+ multiplexed on a single physical machine.
\item[Xen] Xen is a paravirtualising virtual machine
monitor, developed primarily by the
- Systems Research Group at the University
- of Cambridge Computer Laboratory.
+ Systems Research Group at the University
+ of Cambridge Computer Laboratory.
\item[XenLinux] Official name for the port of the Linux kernel
that runs on Xen.
{\bf noht } \\
Disable Hyperthreading. \\
-{\bf ifname=ethXX }\\
- Select which Ethernet interface to use. \\
-
-{\bf ifname=dummy } \\
- Don't use any network interface. \\
-
{\bf com1=$<$baud$>$,DPS[,$<$io\_base$>$,$<$irq$>$] \\
com2=$<$baud$>$,DPS[,$<$io\_base$>$,$<$irq$>$] } \\
Xen supports up to two 16550-compatible serial ports.
omitting the character, enables auto-switching.
[NB. Default for this option is 'a'] \\
+{\bf nmi=xxx } \\
+ Specify what to do with an NMI parity or I/O error. \\
+ 'nmi=fatal': Xen prints a diagnostic and then hangs. \\
+ 'nmi=dom0': Inform DOM0 of the NMI. \\
+ 'nmi=ignore': Ignore the NMI. \\
+ [NB. Default is 'dom0' ('fatal' for debug builds).] \\
+
{\bf dom0\_mem=xxx } \\
Set the maximum amount of memory for domain0. \\
#include <xen/console.h>
#include <asm/ptrace.h>
#include <xen/delay.h>
+#include <xen/event.h>
#include <xen/spinlock.h>
#include <xen/irq.h>
#include <xen/perfc.h>
+#include <xen/softirq.h>
#include <asm/shadow.h>
#include <asm/domain_page.h>
#include <asm/system.h>
#include <asm/i387.h>
#include <asm/pdb.h>
+extern char opt_nmi[];
+
struct guest_trap_bounce guest_trap_bounce[NR_CPUS] = { { 0 } };
#if defined(__i386__)
die("general protection fault", regs, error_code);
}
-asmlinkage void mem_parity_error(unsigned char reason, struct pt_regs *regs)
+asmlinkage void mem_parity_error(struct pt_regs *regs)
{
console_force_unlock();
- printk("\n\nNMI received. Dazed and confused, but trying to continue\n");
- printk("You probably have a hardware problem with your RAM chips\n");
-
- /* Clear and disable the memory parity error line. */
- reason = (reason & 0xf) | 4;
- outb(reason, 0x61);
+ printk("\n\n");
show_registers(regs);
for ( ; ; ) ;
}
-asmlinkage void io_check_error(unsigned char reason, struct pt_regs *regs)
+asmlinkage void io_check_error(struct pt_regs *regs)
{
console_force_unlock();
- printk("\n\nNMI: IOCK error (debug interrupt?)\n");
-
- reason = (reason & 0xf) | 8;
- outb(reason, 0x61);
+ printk("\n\n");
show_registers(regs);
unknown_nmi_error((unsigned char)(reason&0xff), regs);
}
+unsigned long nmi_softirq_reason;
+static void nmi_softirq(void)
+{
+ struct domain *d = find_domain_by_id(0);
+
+ if ( d == NULL )
+ return;
+
+ if ( test_and_clear_bit(0, &nmi_softirq_reason) )
+ send_guest_virq(d, VIRQ_PARITY_ERR);
+
+ if ( test_and_clear_bit(1, &nmi_softirq_reason) )
+ send_guest_virq(d, VIRQ_IO_ERR);
+
+ put_domain(d);
+}
+
asmlinkage void math_state_restore(struct pt_regs *regs, long error_code)
{
/* Prevent recursion. */
extern void cpu_init(void);
cpu_init();
}
+
+ open_softirq(NMI_SOFTIRQ, nmi_softirq);
}
#include <xen/config.h>
#include <xen/errno.h>
+#include <xen/softirq.h>
#include <hypervisor-ifs/hypervisor-if.h>
EBX = 0x00
pushl %eax
SAVE_ALL_NOSEGREGS
- # Check for hardware problems. These are always fatal so we can
- # reload DS and ES when handling them.
+ # Check for hardware problems.
inb $0x61,%al
testb $0x80,%al
jne nmi_parity_err
addl $20,%esp
iret
-nmi_parity_err:
- movl $(__HYPERVISOR_DS),%edx
+nmi_parity_err:
+ # Clear and disable the parity-error line
+ andb $0xf,%al
+ orb $0x4,%al
+ outb %al,$0x61
+ cmpb $'i',%ss:SYMBOL_NAME(opt_nmi) # nmi=ignore
+ je nmi_badseg
+ bts $0,%ss:SYMBOL_NAME(nmi_softirq_reason)
+ bts $NMI_SOFTIRQ,%ss:SYMBOL_NAME(irq_stat)
+ cmpb $'d',%ss:SYMBOL_NAME(opt_nmi) # nmi=dom0
+ je nmi_badseg
+ movl $(__HYPERVISOR_DS),%edx # nmi=fatal
movl %edx,%ds
movl %edx,%es
movl %esp,%edx
push %edx
- push %eax
call SYMBOL_NAME(mem_parity_error)
- ud2
-
+ addl $4,%esp
+ jmp ret_from_intr
+
nmi_io_err:
- movl $(__HYPERVISOR_DS),%edx
+ # Clear and disable the I/O-error line
+ andb $0xf,%al
+ orb $0x8,%al
+ outb %al,$0x61
+ cmpb $'i',%ss:SYMBOL_NAME(opt_nmi) # nmi=ignore
+ je nmi_badseg
+ bts $1,%ss:SYMBOL_NAME(nmi_softirq_reason)
+ bts $NMI_SOFTIRQ,%ss:SYMBOL_NAME(irq_stat)
+ cmpb $'d',%ss:SYMBOL_NAME(opt_nmi) # nmi=dom0
+ je nmi_badseg
+ movl $(__HYPERVISOR_DS),%edx # nmi=fatal
movl %edx,%ds
movl %edx,%es
movl %esp,%edx
push %edx
- push %eax
call SYMBOL_NAME(io_check_error)
- ud2
+ addl $4,%esp
+ jmp ret_from_intr
.data
ENTRY(hypercall_table)
* pfn_info table and allocation bitmap.
*/
unsigned int opt_xenheap_megabytes = XENHEAP_DEFAULT_MB;
+/*
+ * opt_nmi: one of 'ignore', 'dom0', or 'fatal'.
+ * fatal: Xen prints diagnostic message and then hangs.
+ * dom0: The NMI is virtualised to DOM0.
+ * ignore: The NMI error is cleared and ignored.
+ */
+#ifdef NDEBUG
+char opt_nmi[10] = "dom0";
+#else
+char opt_nmi[10] = "fatal";
+#endif
static struct {
unsigned char *name;
{ "leveltrigger", OPT_STR, &opt_leveltrigger },
{ "edgetrigger", OPT_STR, &opt_edgetrigger },
{ "xenheap_megabytes", OPT_UINT, &opt_xenheap_megabytes },
+ { "nmi", OPT_STR, &opt_nmi },
{ NULL, 0, NULL }
};
#define VIRQ_DEBUG 2 /* Request guest to dump debug info. */
#define VIRQ_CONSOLE 3 /* (DOM0) bytes received on emergency console. */
#define VIRQ_DOM_EXC 4 /* (DOM0) Exceptional event for some domain. */
-#define NR_VIRQS 5
+#define VIRQ_PARITY_ERR 5 /* (DOM0) NMI parity error. */
+#define VIRQ_IO_ERR 6 /* (DOM0) NMI I/O error. */
+#define NR_VIRQS 7
/*
* MMU-UPDATE REQUESTS
#ifndef __XEN_SOFTIRQ_H__
#define __XEN_SOFTIRQ_H__
+#define AC_TIMER_SOFTIRQ 0
+#define NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ 1
+#define DEBUGGER_SOFTIRQ 2
+#define NMI_SOFTIRQ 3
+#define SCHEDULE_SOFTIRQ 4
+#define NR_SOFTIRQS 5
+
+#ifndef __ASSEMBLY__
+
#include <xen/config.h>
#include <xen/lib.h>
#include <xen/smp.h>
#include <asm/bitops.h>
#include <asm/hardirq.h>
-enum
-{
- AC_TIMER_SOFTIRQ=0,
- NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ,
-#ifdef XEN_DEBUGGER
- DEBUGGER_SOFTIRQ,
-#endif
- SCHEDULE_SOFTIRQ, /* NB. This must come last or do_softirq() will break! */
- NR_SOFTIRQS
-};
-
typedef void (*softirq_handler)(void);
asmlinkage void do_softirq(void);
set_bit(nr, &softirq_pending(smp_processor_id()));
}
+#endif /* __ASSEMBLY__ */
+
#endif /* __XEN_SOFTIRQ_H__ */